package com.wangyb.wework.mapper.contact;

import com.ruoyi.common.core.mybatisplus.MybatisPlusRedisCache;
import com.ruoyi.common.core.page.BaseMapperPlus;
import com.wangyb.wework.entity.contact.WwContact;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 联系人（客户列）Mapper接口
 *
 * @Author: wangyb
 * @Date: 2021/6/30 6:21 下午
 */
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
public interface WwContactMapper extends BaseMapperPlus<WwContact> {
	@Select(" select * from ww_contact where wx_external_userid =#{wxExternalUserid}")
	WwContact getContactByWxExternalUserid(@Param("wxExternalUserid") String wxExternalUserid);
	@Update(" update ww_contact set del_flag=0 where wx_external_userid =#{wxExternalUserid}")
	boolean restoreByWxExternalUserid(@Param("wxExternalUserid") String wxExternalUserid);
}
